import win32gui
hwnd_title = {}

def get_all_hwnd(hwnd, mouse):
    if (win32gui.IsWindow(hwnd) and
            win32gui.IsWindowEnabled(hwnd) and
            win32gui.IsWindowVisible(hwnd)):
        hwnd_title.update({hwnd: win32gui.GetWindowText(hwnd)})


win32gui.EnumWindows(get_all_hwnd, 0)
def getRectangle () :
    for h, t in hwnd_title.items():
        if t :
            print(h, t)
            try:
                index = -1
                index = t.index('Clicker');
            except:
                pass
            if index != -1:
                left, top, right, bottom = win32gui.GetWindowRect(h)
                return [left, top, right, bottom, h]